package com.pai4j.ugc.service.chain;

import com.pai4j.domain.vo.response.moment.MomentVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class MomentVideoHandler implements MomentPublishHandler {


    @Override
    public void handle(MomentVO moment, MomentPublishHandlerChain chain) throws Exception {

        if (!ObjectUtils.equals(moment.getIncludeVideo(), true)) {
            chain.handle(moment, chain);
            return;
        }

        chain.handle(moment, chain);
    }
}
